/* 考试页面样式 */
.exam-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.exam-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px 30px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.exam-header-left,
.exam-header-right {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.exam-header-center {
    flex: 1;
    text-align: center;
}

.exam-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.user-role {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.student-badge {
    background: #28a745;
}

.exam-content {
    max-width: 1200px;
    margin: 0 auto;
}

.exam-view {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* 考试头部信息卡片 */
.exam-header-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 30px;
    color: white;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.exam-info {
    flex: 1;
}

.exam-title-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.exam-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.meta-icon {
    font-size: 16px;
}

.exam-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-end;
}

/* 倒计时器 */
.timer-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
    transition: all 0.3s ease;
}

.timer-card.time-warning {
    background: rgba(255, 107, 107, 0.3);
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.timer-icon {
    font-size: 24px;
}

.timer-content {
    display: flex;
    flex-direction: column;
}

.timer-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.timer-time {
    font-size: 20px;
    font-weight: 700;
}

/* 进度指示器 */
.progress-indicator {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    min-width: 200px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-label {
    font-size: 12px;
    opacity: 0.8;
}

.progress-count {
    font-size: 14px;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-percentage {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
}

/* 题目导航 */
.question-nav {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.nav-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.nav-subtitle {
    font-size: 12px;
    color: #666;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 12px;
}

.nav-item {
    width: 50px;
    height: 50px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: white;
    color: #666;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.nav-item.answered {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.nav-item.current {
    background: #764ba2;
    border-color: #764ba2;
    color: white;
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

/* 题目列表 */
.question-list {
    margin-bottom: 40px;
}

.question-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.question-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.question-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.question-index {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.question-type {
    background: #f0f9eb;
    color: #67c23a;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.question-score {
    background: #fff3cd;
    color: #856404;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.question-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    color: #666;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.action-icon {
    font-size: 14px;
}

.question-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.6;
    margin: 0 0 25px 0;
}

/* 选项容器 */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.option-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(5px);
}

.option-item.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.option-item.selected .option-text {
    color: white;
}

.option-radio,
.option-checkbox {
    flex-shrink: 0;
}

.radio-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
}

.radio-circle.checked {
    border-color: #667eea;
    background: #667eea;
}

.radio-circle.checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.checkbox-square {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-square.checked {
    border-color: #667eea;
    background: #667eea;
}

.checkmark {
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.option-key {
    font-weight: 600;
    color: #667eea;
    min-width: 20px;
}

.option-text {
    color: #333;
    line-height: 1.5;
}

.option-icon {
    font-size: 18px;
}

.judge-option {
    justify-content: flex-start;
}

/* 答案输入 */
.answer-input,
.answer-textarea {
    margin-top: 20px;
}

.input-field,
.textarea-field {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.input-field:focus,
.textarea-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.textarea-field {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.word-count {
    margin-top: 10px;
    text-align: right;
}

.count-text {
    font-size: 12px;
    color: #666;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.action-btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    min-width: 140px;
    justify-content: center;
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.action-btn.secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e5e9;
}

.action-btn.secondary:hover {
    background: #e9ecef;
    color: #333;
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 18px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .exam-container {
        padding: 10px;
    }

    .exam-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .exam-view {
        padding: 20px;
    }

    .exam-header-card {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .exam-controls {
        align-items: center;
        width: 100%;
    }

    .timer-card,
    .progress-indicator {
        width: 100%;
        min-width: auto;
    }

    .nav-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 8px;
    }

    .nav-item {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .question-card {
        padding: 20px;
    }

    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .question-info {
        flex-wrap: wrap;
        gap: 10px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .action-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .exam-title {
        font-size: 20px;
    }

    .exam-title-section h2 {
        font-size: 22px;
    }

    .meta-item {
        font-size: 12px;
        padding: 6px 10px;
    }

    .question-title {
        font-size: 16px;
    }

    .option-item {
        padding: 12px 16px;
    }

    .input-field,
    .textarea-field {
        padding: 12px 16px;
        font-size: 14px;
    }
}